DAY(numeric expression or numeric variable)

Numeric Expression

Returns an integer. If the argument is a full date, then the function returns the numeric value of the day component. If the expression includes a partial date (MM/YYYY only), then the function returns a range of values.

Examples:

DateVar = “01/26/2018” Day(DateVar) returns 26

DateVar=”01/??/2018” Day(DateVar) returns -1,[Undefined],min=1,max=31

DateVar=.DK, where normal range is 1/1/2000 to 12/31/2020, DAY(DateVar) returns -1, [Undefined], min=1, max=31

TODAY = "08/10/2018" Day(TODAY) returns 10

Tip: If the argument passed to Day(), Month(), and Year() is a numeric value and not a date variable, the function will treat the argument as a date and return the appropriate value. For example, if DateVar =43131 (which corresponds to 01/31/2018), then Day(DateVar) returns 31.